package com.haoshuang.zhouzhoubang.ui.page.message.child.system

import com.haoshuang.zhouzhoubang.databinding.ItemSystemMessageBinding
import com.haoshuang.zhouzhoubang.model.bean.SystemMsgBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.visibleOrGone


/**
 *
 */
class SystemMessageAdapter(data: MutableList<SystemMsgBean>) :
    BaseBindingQuickAdapter<SystemMsgBean, ItemSystemMessageBinding>(data) {

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: SystemMsgBean?) {
        holder.getViewBinding<ItemSystemMessageBinding>().apply {
            llReadedLine.visibleOrGone(item?.isFirstRead == true)

            tvAddTime.text = item?.add_time
            viewUnRead.visibleOrGone(item?.is_read != 1)
            tvContent.text = item?.content
        }
    }

}